package com.yanqu.road.logic.bussiness.servercenter;

import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.player.UserExchange;
import com.yanqu.road.entity.servercenter.ExchangeInfo;

import java.util.Map;


public class ExchangeBussiness {

	public static ExchangeInfo getExchangeInfo(String exchangeKey) {
		return DaoHelper.getExchangeDaoImpl().getExchangeInfo(exchangeKey);
	}

	public static boolean updateExchangeUseTimes(String exchangeKey) {
		return DaoHelper.getExchangeDaoImpl().updateExchangeUseTimes(exchangeKey);
	}

	public static Map<String, UserExchange> getUserExchangeMap(long userId) {
		return DaoHelper.getUserExchangeDaoImpl().getUserExchangeMap(userId);
	}

	public static boolean addUserExchange(UserExchange userExchange){
		return DaoHelper.getUserExchangeDaoImpl().add(userExchange);
	}

	public static boolean updateUserExchange(UserExchange userExchange){
		return DaoHelper.getUserExchangeDaoImpl().update(userExchange);
	}
}
